package com.sky.mapper;

import com.sky.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.Map;

@Mapper
public interface UserMapper {
    /**
     * 根据//微信用户唯一标识查找用户
     * @param openid
     * @return
     */
    @Select("select * from user where openid = #{openid}")
    User getByOpenId(String openid);

    void insert(User user1);

    /**
     * 查询用户数量
     * @param map
     */
    Integer countByMap(Map map);
}
